package com.rory.gooday.common;

import com.alibaba.druid.filter.config.ConfigTools;

public class DruidEncryptor {
    public static void main(String[] args) throws Exception {
        String[] keyPair = ConfigTools.genKeyPair(512);
        System.out.println("Private Key: " + keyPair[0]);
        System.out.println("Public Key: " + keyPair[1]);
        String encryptedPassword = ConfigTools.encrypt(keyPair[0], "rory@root@1234");
        System.out.println("Encrypted Password: " + encryptedPassword);
    }
}
